﻿using System;
using System.Windows.Navigation;

namespace SBPweb.RIA.Client.Contracts.Base
{

    public class NavigatorCancelEventArgs : NavigatorEventArgs
    {

        public NavigatorCancelEventArgs(Uri uri)
            : this(uri, false)
        {
        }

        public NavigatorCancelEventArgs(Uri uri, bool cancel)
            : this(uri, NavigationMode.New, cancel)
        {
        }

        public NavigatorCancelEventArgs(Uri uri, NavigationMode mode)
            : this(uri, mode, false)
        {
        }

        public NavigatorCancelEventArgs(Uri uri, NavigationMode mode, bool cancel)
            : base(uri)
        {
            this.Cancel = cancel;
            this.NavigationMode = mode;
        }

        // Summary:
        //     Gets a value that indicates the type of navigation that is occurring.
        //
        // Returns:
        //     A value that indicates the type of navigation (System.Windows.Navigation.NavigationMode.Back,
        //     System.Windows.Navigation.NavigationMode.Forward, or System.Windows.Navigation.NavigationMode.New)
        //     that is occurring.
        public NavigationMode NavigationMode
        {
            get;
            protected set;
        }
        //
        // Summary:
        //     Gets the uniform resource identifier (URI) for the content that is being
        //     navigated to.
        //
        // Returns:
        //     A value that represents the URI for the content.
        public new Uri Uri
        {
            get;
            protected set;
        }

        public bool Cancel
        {
            get;
            set;
        }

    }

}